package com.wcpdoc.exam.core.service.impl;

import com.wcpdoc.core.dao.BaseDao;
import com.wcpdoc.core.service.impl.BaseServiceImp;
import com.wcpdoc.exam.core.dao.MyMockQuestionDao;
import com.wcpdoc.exam.core.entity.MyMockQuestion;
import com.wcpdoc.exam.core.service.ExamQuestionService;
import com.wcpdoc.exam.core.service.MyExamMockService;
import com.wcpdoc.exam.core.service.MyMockQuestionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 我的模拟试题服务层实现
 * 
 */
@Service
public class MyMockQuestionServiceImpl extends BaseServiceImp<MyMockQuestion> implements MyMockQuestionService {
	@Resource
	private MyMockQuestionDao myQuestionDao;
	@Resource
	private ExamQuestionService examQuestionService;
	@Resource
	private MyExamMockService myExamService;
	
	@Override
	@Resource(name = "myMockQuestionDaoImpl")
	public void setDao(BaseDao<MyMockQuestion> dao) {
		super.dao = dao;
	}

	@Override
	public MyMockQuestion getMyMockQuestion(Integer examId, Integer userId, Integer questionId) {
		return myQuestionDao.getMyMockQuestion(examId, userId, questionId);
	}

	@Override
	public List<MyMockQuestion> getList(Integer examId, Integer userId) {
		return myQuestionDao.getList(examId, userId);
	}

	@Override
	public void clear(Integer examId) {
		myQuestionDao.clear(examId);
	}

}
